﻿<Window x:Class="VisaCRM.Modules.Admin.Views.CountryView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:vm="clr-namespace:VisaCRM.Modules.Admin.ViewModels"
             xmlns:v="clr-namespace:VisaCRM.Modules.Admin.Views"
             mc:Ignorable="d" Width="574.643" Height="245.001" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
    <Window.Resources>
        <DataTemplate DataType="vm:CountryViewModel">
            
        </DataTemplate>
    </Window.Resources>
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <DataGrid Name="grdCountry" Grid.Column="0" Grid.RowSpan="6" SelectedItem="{Binding Path=.CurrentCountry, Mode=TwoWay}" ItemsSource="{Binding Path=AllCountries}" AutoGenerateColumns="False" Margin="0,0,2,0" >
            <DataGrid.Columns>
                <DataGridTextColumn Header="Country" Width="Auto" Binding="{Binding Path=CountryName}" />
            </DataGrid.Columns>
        </DataGrid>
        <Label HorizontalAlignment="Left" Content="Country" Background="Aquamarine" Margin="85,6,0,0" VerticalAlignment="Top" Height="27" RenderTransformOrigin="0.5,0.5" Width="61" Grid.Column="1"/>

        <TextBox HorizontalAlignment="Left" Grid.Column="2" Height="23" Margin="42,10,0,0" VerticalAlignment="Top" Width="120" Text="{Binding CurrentCountryName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged }"/>
        <Label HorizontalAlignment="Left" Content="Nationality" Background="Aquamarine" Margin="85,2,0,0" VerticalAlignment="Center" Height="27" RenderTransformOrigin="0.5,0.5" Width="70" Grid.Column="1" Grid.Row="1"/>
        <TextBox HorizontalAlignment="Left" Height="22" Margin="42,6,0,8" VerticalAlignment="Center" Width="120" Text="{Binding CurrentCountryNationality,  Mode=TwoWay , UpdateSourceTrigger=PropertyChanged }" Grid.Column="2" Grid.Row="1"/>
        <Button HorizontalAlignment="Left" Content="Add New" Margin="69,3,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=AddNewCommand}" Grid.Column="1" Grid.Row="2"/>
        <Button HorizontalAlignment="Left" Content="Save" Margin="69,3,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=SaveCommand}" Grid.Column="1" Grid.Row="3"/>
        <Button HorizontalAlignment="Left" Content="Cancel" Margin="69,3,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=CancelCommand}" Grid.Column="1" Grid.Row="5"/>
        <Button HorizontalAlignment="Left" Content="Close" Margin="69,3,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=CloseCommand}" RenderTransformOrigin="1.841,2.034" Grid.Column="1" Grid.Row="4"/>
    </Grid>
</Window>
